package com.tuanzi.loan.web.lazy.family;

import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import org.springframework.data.domain.Page;

import com.tuanzi.loan.vo.request.family.IcpWebCommentSearchRequest;
import com.tuanzi.loan.vo.response.family.IcpWebCommentSearchResponse;
import com.tuanzi.loan.business.service.family.IcpWebCommentService;

/**
 * ICP备案网站评论DataModel
 * @author JinRuiyang 2017/12/13 11:43:41
 */
public class IcpWebCommentDataModel extends
        BaseLazyDataModel<IcpWebCommentSearchRequest, IcpWebCommentSearchResponse> {

    private IcpWebCommentService icpwebcommentService = SpringContextHolder.getBean(IcpWebCommentService.class);

    public IcpWebCommentDataModel(IcpWebCommentSearchRequest searchRequest) {
        super(searchRequest);
    }

    @Override
    protected Page<IcpWebCommentSearchResponse> doLoad(PageSearcher<IcpWebCommentSearchRequest> pageSearcher) {
        return icpwebcommentService.list(pageSearcher);
    }
}
